import React, { Component } from "react";
import { Button } from "../node_modules/react-native-elements";

export class MyButton extends Component {
  render() {
    let buttonStyle = {};
    if (!this.props.type || this.props.type == "solid") {
      buttonStyle = {
        backgroundColor: "tomato"
      };
    }
    let titleColor = "white";
    if (this.props.type == "clear") {
      titleColor = "tomato";
    }
    return (
      <Button
        {...this.props}
        buttonStyle={{
          ...buttonStyle,
          ...this.props.buttonStyle
        }}
        titleStyle={{
          color: titleColor,
          ...this.props.titleStyle
        }}
      />
    );
  }
}

export default MyButton;
